package imgutils

import (
	"image"
	"os"
)

func LoadImageFromFile(filename string) (img image.Image, imgtype string, err error) {
	imgfile, err := os.Open(filename)
	if err != nil {
		return nil, "", err
	}
	defer imgfile.Close()
	img, imgtype, err = image.Decode(imgfile)
	return
}
